#run.mycnn.rd3.logxyx.dif-.cat.wav_extMaxMin.norm+PV5dFil+pol3+encodDrop05.CatFilt_MOutModelMap12.Mid10.OutSigUd+logOAnd+logO.nosiInDrop04out05+FormBasBl4884_ab.1e3wd5+mse.fl4a3g2g_Warnu.initMoveGood
#prepare
echo '##################################'
echo '(1).prepare...'
cd ../stock_ai/
git pull #git@gitee.com:silencewing/stock_ai.git
cd ../simple_ai/
git pull #git@gitee.com:silencewing/simple_ai.git


tick=$(date +%Y.%m.%d_%H.%M.%S)'__'$1

#run and mv result
echo '##################################'
echo '(2).ready...'
file='ready.'$tick

cd ../stock_ai/
echo $file>>$file
git add $file
message="remote run "$tick
git commit  -m "$message"
git push


#run and mv result
echo '##################################'
echo '(2).run...'
cd ../stock_workspace/
./clean.sh
#source /home/qw/src/.env_ai/bin/activate
source /home/qw/data/src/.env38/bin/activate
#tick=$(date +%Y%m%d%H%M%S)
file='out.'$tick
python ./stock_ai/stock/model_worker_imp/stock_torch_model_worker.py>$file
mv $file ../stock_ai/

#push
echo '##################################'
echo '(3).push...'
cd ../stock_ai/
git add $file
message="remote run result "$tick
git commit  -m "$message"
git push


echo '##################################'
